#ifndef _RKNN_DET_POSTPROCESS_H_
#define _RKNN_DET_POSTPROCESS_H_

#include <stdint.h>
#include <vector>
#include "rknn_api.h"
#include "common.h"
#include "image_utils.h"

#define OBJ_NAME_MAX_SIZE 64
#define OBJ_NUMB_MAX_SIZE 128
// #define OBJ_CLASS_NUM 80
// #define OBJ_CLASS_NUM 2
// #define NMS_THRESH 0.45
// #define BOX_THRESH 0.25

// class rknn_app_context_t;



typedef struct {
    int id;
    float score;
} object_detect_result;


int pre_process(rknn_app_context_t* app_ctx,image_buffer_t* img,rknn_input *inputs,letterbox_t *letter_box);

int init_post_process(const char *label_path,char **labels,int &class_num);
void deinit_post_process(char **labels,int &class_num);
const char *coco_cls_to_name(int cls_id,char **labels,int &class_num);
int post_process(rknn_app_context_t *app_ctx, rknn_output *outputs, float conf_threshold, object_detect_result *od_results,int &class_num);

void deinitPostProcess();
#endif //_RKNN_YOLOV8_DEMO_POSTPROCESS_H_
